<template>
  <div class="code">
    <p>微信授权中...</p>
  </div>
</template>

<script>
  import { apiUrl } from '../config'
  export default {
    name: 'code',
    data () {
      return {}
    },
    mounted: function () {
      this.$nextTick(function () {
        this.loadData()
      })
    },
    methods: {
      loadData: function () {
        window.location.href = apiUrl + '/oauth/callback/weixin' + window.location.search
      }
    }
  }
</script>

<style scoped lang="less">
  p{
    text-align: center;
    font-size:1.2rem;
    margin:2rem auto;
  }
</style>
